/*
 * @Author: Turump 
 * @Date: 2021-04-26 09:53:15 
 * @Last Modified by: Turump
 * @Last Modified time: 2021-04-26 09:59:29
 */

import ActionBaseTask from "./ActionBaseTask";

const { ccclass, property, menu } = cc._decorator;

@ccclass
@menu("动作任务/Blink")
export default class BlinkTask extends ActionBaseTask {

    @property({ displayName: "循环次数", tooltip: "无限循环就把数字设大一点" })
    repeatTime = 100000;

    getAction() {
        return cc.tween(this.node)
            .repeat(this.repeatTime,
                cc.tween(this.node)
                    .parallel(
                        this.getPlayAudioTween(),
                        cc.tween(this.node)
                            .blink(this.actionDuration, 1))
            );
    }
}
